﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Fail : MonoBehaviour
{
    public GameObject fail_window;
    private void OnTriggerEnter2D(Collider2D other)  //碰到触发器
    {
        if (other.gameObject.tag == "enemy")
        {
            Time.timeScale = 0f;
            fail_window.SetActive(true);
        }
    }

    public void Go_On()
    {
        Time.timeScale = 1f;
    }
}
